
package com.welsy.classroom.model
{
   import com.adobe.cairngorm.model.ModelLocator;
   import com.welsy.usermgt.vo.ClassVO;
   import mx.collections.ArrayCollection;
   import mx.collections.ICollectionView;     
     
   [Bindable]
   public class ClassModelLocator implements ModelLocator
   {
      private static var modelLocator : ClassModelLocator;
      
      public static function getInstance() : ClassModelLocator 
      {
      	if ( modelLocator == null )
      	{
      		modelLocator = new ClassModelLocator();
      	}
      		
      	return modelLocator;
      }
      
      //Constructor should be private but current AS3.0 does not allow it yet (?)...
      public function ClassModelLocator() 
      {	
         if ( modelLocator != null )
         {
         	throw new Error( "Only one CourseModelLocator instance should be instantiated" );	
         }
         
         //assets = new CairngormCourseAssets();
      }
    
    
		public var currentClass : ClassVO = null;
		public var classes : ArrayCollection = null; //ClassVO
		public var classEditingSucceeded : Boolean = false;
		public var relatedItinera : ArrayCollection = new ArrayCollection; //IterVO
		public var availableItinera  : ArrayCollection = new ArrayCollection; //IterVO
		public var classRemovalSucceeded : Boolean = false;
		public var refreshClass : Boolean = false; //used to find when to refresh class properties   
   }

}
